home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 9.4 KB | 337 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWGConst.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWGCONST_H
- #define FWGCONST_H
-
- // ----- OpenDoc Includes -----
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- // ----- Macintosh Includes -----
-
- #if defined(FW_BUILD_MAC) && !defined(__QUICKDRAW__)
- #include <QuickDraw.h>
- #endif
-
- // ----- Windows Includes -----
-
- #if defined(FW_BUILD_WIN) && !defined(_INC_WINDOWS)
- #include <windows.h>
- #endif
-
- // ----- ODF Includes -----
-
- #ifndef FWPAT_H
- #include "FWPat.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CColor;
- class FW_CLASS_ATTR FW_CString32;
- class FW_CLASS_ATTR FW_CPoint;
- class FW_CLASS_ATTR FW_CRect;
-
- //========================================================================================
- // Graphic System
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- const ODGraphicsSystem FW_kGraphicSystem = kODQuickDraw;
- #endif
-
- #ifdef FW_BUILD_WIN
- const ODGraphicsSystem FW_kGraphicSystem = kODWindows;
- #endif
-
- //========================================================================================
- // Patterns
- //========================================================================================
-
- const short FW_kNbStandardPatterns = 12;
-
- //========================================================================================
- // Styles
- //========================================================================================
-
- enum FW_EStandardStyles
- {
- FW_kNormalStyle,
- FW_kDashStyle,
- FW_kDotStyle,
- FW_kDashDotStyle,
- FW_kDashDotDotStyle
- };
-
- //========================================================================================
- // Inks
- //========================================================================================
-
- enum FW_EStandardInks
- {
- FW_kNormalInk,
- FW_kNormalTextInk,
- FW_kInvertInk,
- FW_kWhiteEraseInk
- };
-
- //========================================================================================
- // Fonts
- //========================================================================================
-
- enum FW_EStandardFonts
- {
- FW_kNormalFont
- };
-
- //========================================================================================
- // Transfer Modes
- //========================================================================================
- // See FW_gTransferModes in FW_GrGlob.cpp
-
- typedef unsigned long FW_TransferModes;
-
- const FW_TransferModes FW_kCopy = 0xFFFF0000L;
- const FW_TransferModes FW_kNotCopy = 0xFFFF0001L;
- const FW_TransferModes FW_kOr = 0xFFFF0002L;
- const FW_TransferModes FW_kNotOr = 0xFFFF0003L;
- const FW_TransferModes FW_kXOr = 0xFFFF0004L;
- const FW_TransferModes FW_kNotXOr = 0xFFFF0005L;
- const FW_TransferModes FW_kClear = 0xFFFF0006L;
- const FW_TransferModes FW_kNotClear = 0xFFFF0007L;
- const FW_TransferModes FW_kHilite = 0xFFFF0008L;
-
- const FW_TransferModes FW_kErase = 0xFFFF0009L; // 'Special' Transfer Mode
- const FW_TransferModes FW_kInvert = 0xFFFF000AL; // 'Special' Transfer Mode
-
- const FW_TransferModes FW_LastTransferMode = FW_kInvert;
-
- //========================================================================================
- // Style dash kinds
- //========================================================================================
-
- enum FW_EStyleDash
- {
- FW_kSolidLine,
-
- FW_kDash,
- FW_kDot,
- FW_kDashDot,
- FW_kDashDotDot,
-
- FW_kOpaque = 0x100,
-
- FW_kDashOpaque = FW_kDash + FW_kOpaque,
- FW_kDotOpaque = FW_kDot + FW_kOpaque,
- FW_kDashDotOpaque = FW_kDashDot + FW_kOpaque,
- FW_kDashDotDotOpaque = FW_kDashDotDot + FW_kOpaque
- };
-
- //========================================================================================
- // Font Style
- //========================================================================================
-
- typedef unsigned short FW_FontStyle;
-
- enum FW_EFontStyles
- {
- FW_kPlain = 0x0000,
- FW_kBold = 0x0001,
- FW_kItalic = 0x0002,
- FW_kUnderline = 0x0004,
- FW_kOutline = 0x0008,
- FW_kShadow = 0x0010,
- FW_kCondensed = 0x0020,
- FW_kExtended = 0x0040,
- FW_kStrikeOut = 0x0080
- };
-
- //========================================================================================
- // Shape Types
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- enum FW_EShapeCategories
- {
- FW_kLineShape, // Line
- FW_kGeometricShape, // Rect, Oval, Arc, RoundRect, Region
- FW_kTypographicShape, // Text
- FW_kImageShape // Bitmap, Picture
- };
- #endif
-
- #ifdef FW_BUILD_WIN
- enum FW_EShapeCategories
- {
- FW_kGeometricShapeWithInvert, // Rect, Region
- FW_kGeometricShape, // Line, RoundRect, Oval, Arc
- FW_kTypographicShape, // Text
- FW_kImageShape // Bitmap, Picture
- };
- #endif
-
- //========================================================================================
- // Rendering Verbs
- //========================================================================================
-
- enum FW_ERenderVerbs
- {
- FW_kNoRendering,
- FW_kFrame,
- FW_kFill
- };
-
- //========================================================================================
- // Globals
- //========================================================================================
-
- // ----- Standard colors -----
- extern const FW_CColor FW_kRGBBlack;
- extern const FW_CColor FW_kRGBWhite;
- extern const FW_CColor FW_kRGBRed;
- extern const FW_CColor FW_kRGBYellow;
- extern const FW_CColor FW_kRGBBlue;
- extern const FW_CColor FW_kRGBGreen;
- extern const FW_CColor FW_kRGBBrown;
- extern const FW_CColor FW_kRGBPurple;
- extern const FW_CColor FW_kRGBLightBlue;
- extern const FW_CColor FW_kRGBGray;
- extern const FW_CColor FW_kRGBLightGray;
- extern const FW_CColor FW_kRGBDarkGray;
-
- // ----- Standard Patterns -----
- extern const FW_BitPattern FW_kBlackPat;
- extern const FW_BitPattern FW_kWhitePat;
- extern const FW_BitPattern FW_kGrayPat;
- extern const FW_BitPattern FW_kLightGrayPat;
- extern const FW_BitPattern FW_kDarkGrayPat;
- extern const FW_BitPattern FW_kHorizontalPat;
- extern const FW_BitPattern FW_kVerticalPat;
- extern const FW_BitPattern FW_kFDiagonalPat;
- extern const FW_BitPattern FW_kBDiagonalPat;
- extern const FW_BitPattern FW_kCrossPat;
- extern const FW_BitPattern FW_kDiagCrossPat;
- extern const FW_BitPattern FW_kAntPat;
-
- // ------ Standard font names -----
- extern const FW_CString32 FW_kSystemFont;
- extern const FW_CString32 FW_kDefaultFont;
- extern const FW_CString32 FW_kHelvetica;
- extern const FW_CString32 FW_kTimes;
- extern const FW_CString32 FW_kCourier;
- extern const FW_CString32 FW_kPalatino;
-
- //========================================================================================
- // Single-line Text Alignment Options
- //========================================================================================
-
- typedef unsigned short FW_TextAlignment;
-
- enum
- {
- // Horizontal alignment
- FW_kTextAlignLeft = 0, // default
- FW_kTextAlignRight = 0x0001,
- FW_kTextAlignHCenter = 0x0002,
-
- FW_kTextAlignPrivHorzAlignMask = 0x000F,
-
- // Vertical alignment
- FW_kTextAlignTop = 0, // default
- FW_kTextAlignBottom = 0x0010,
- FW_kTextAlignBaseLine = 0x0020,
- FW_kTextAlignVCenter = 0x0040,
-
- FW_kTextAlignPrivVertAlignMask = 0x00F0,
-
- // Position to use
- FW_kTextAlignUseSpecifiedPos = 0, // default
- FW_kTextAlignUseCurrentPos = 0x0100,
-
- FW_kTextAlignPrivUsePosMask = 0x0F00
- };
-
- //========================================================================================
- // Text Box Alignment Options
- //========================================================================================
-
- typedef unsigned short FW_TextBoxOptions;
-
- enum
- {
- // Horizontal justification
- FW_kTextBoxJustifyLeft = 0, // default
- FW_kTextBoxJustifyRight = 0x0001,
- FW_kTextBoxJustifyHCenter = 0x0002,
-
- FW_kTextBoxPrivHorzJusificationMask = 0x000F,
-
- // Vertical jusitification
- FW_kTextBoxJustifyTop = 0, // default
- FW_kTextBoxJustifyBottom = 0x0010,
- FW_kTextBoxJustifyVCenter = 0x0020,
-
- FW_kTextBoxPrivVertJusificationMask = 0x00F0,
-
- // Should the text be clipped to the box? If not, make sure the box is large enough
- FW_kTextBoxNoClipToBox = 0,
- FW_kTextBoxClipToBox = 0x0100, // default
-
- // The options below apply only if the following flag is not set
- FW_kTextBoxSingleLine = 0x0200,
-
- // Word wrapping and breaking options
- FW_kTextBoxWordWrap = 0x0400,
- FW_kTextBoxWordBreak = 0x0800
- };
-
-
- //========================================================================================
- // Icon drawing
- //========================================================================================
-
- typedef unsigned short FW_RenderIconOptions;
-
- enum
- {
- // Horizontal alignment
-
- FW_kIconAlignLeft = 0, // default
- FW_kIconAlignCenter = 0x0001,
- FW_kIconAlignRight = 0x0002,
-
- FW_kIconPrivHorzMask = 0x000F,
-
- // Vertical alignment
-
- FW_kIconAlignTop = 0,
- FW_kIconAlignVCenter = 0x0010,
- FW_kIconAlignBottom = 0x0020,
-
- FW_kIconPrivVertMask = 0x00F0,
-
- // Scale the icon to the rectangle
- FW_kIconScaleToFit = 0x0100
- };
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif
-